#include "StdAfx.h"

void init()
{
	Log->info("Starting GameServer...");
	Net->init("9955");
	Net->run();
}

void cleanshutdown(int cod)
{

	Log->warning("--- Begin Clean Shutdown ---");

	// Shutting down services
	Net->stop();
	Log->stop();

	getchar();
	exit(0);
}

int main(int argc,char** argv)
{

	signal(SIGINT, cleanshutdown);
	Log->info("NetServer v0.01");
	init();
	TaskExecutor te(10);
	te.addTask(newTask(boost::bind<int>(printf,"TaskExecutor mola\n")));
	//te.addTask(newTask(boost::bind(&LogSystem::info,Log,"hi\n")));
	// Atencion al teclado
	//while(true)
	getchar();
	getchar();

	return 0;
}
